package cn.anquing.shardingsphere.demo.repository;

import cn.anquing.shardingsphere.demo.entity.Order;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author wangqq65
 * @since 2021/9/3 17:55
 */
public interface OrderRepository extends JpaRepository<Order,Long> {
    
    /**
     * getByOrderId.
     *
     * <p>getByOrderId.
     *
     * @author wangqq65
     * @since 2021/9/7 10:19
     * @param orderId
     * @return 
     */
    Order findByOrderId(Long orderId);

    /**
     * findByUserId.
     *
     * <p>findByUserId.
     *
     * @author wangqq65
     * @since 2021/9/7 15:42
     * @param userId
     * @return 
     */
    List<Order> findByUserId(Long userId);
}
